<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="manager/css/font.css">
    <link rel="stylesheet" href="manager/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="manager/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="manager/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素88</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so layui-form-pane">
          <input type="hidden" name="pageNum" value="1"/>
          <input type="hidden" name="pageSize" value="5"/>
          <input type="text" name="auname"  th:value="${auname}" placeholder="请输入权限名" autocomplete="off" class="layui-input">
          <input type="text" name="aupath"  th:value="${aupath}" placeholder="请输入权限地址" autocomplete="off" class="layui-input">
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock>
        <span class="x-right" th:text="${'共有数据：'+pageInfo.total+' 条'}" style="line-height:40px"></span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th>ID</th>
            <th>权限规则</th>
            <th>权限名称</th>
        </thead>
        <tbody>
          <tr th:each="authPojo:${pageInfo.list}">
            <td th:text="${authPojo.auid}"></td>
            <td th:text="${authPojo.aupath}"></td>
            <td th:text="${authPojo.auname}"></td>
          </tr>
        </tbody>
      </table>
      <div class="page">
        <div>
          <a class="prev" th:if="${pageInfo.pageNum>1}"  href="javascript:void(0)" th:onclick="ss([[${pageInfo.pageNum-1}]],[[${pageInfo.pageSize}]])" >&lt;&lt;</a>
          <span class="prev" th:if="${pageInfo.pageNum<=1}" >&lt;&lt;</span>
          <span class="num" th:text="${pageInfo.pageNum+'/'+pageInfo.pages}"></span>
          <a class="next"  th:if="${pageInfo.pageNum < pageInfo.pages}" href="javascript:void(0)" th:onclick="ss([[${pageInfo.pageNum+1}]],[[${pageInfo.pageSize}]])">&gt;&gt;</a>
          <span class="prev" th:if="${pageInfo.pageNum>=pageInfo.pages}" >>></span>
        </div>
      </div>
    </div>
    </div>
    <script>
      layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });
      function ss(pageNum,pageSize){
        $(":input[name='pageNum']").val(pageNum)
        $(":input[name='pageSize']").val(pageSize)
        $("form").submit();
      }
    </script>
  </body>

</html>